1. Field of the Invention
The present invention relates to an image processing apparatus for expressing a model by a combination of unit graphics and a method of the same.
2. Description of the Related Art
Along with the improvement in operating speeds and strengthening of graphics generation functions in recent computer systems, computer graphics (CG) technology for preparing and processing graphics and images using computer resources is being actively researched and developed and being put into practical use.
For example, in three-dimensional graphics, the optical phenomenon when a three-dimensional object is illuminated by a predetermined light source is expressed by a mathematical model and the surface of the object is given shading or brightness or further given a texture based on this model so as to generate a more realistic, three-dimensional-like two-dimensional high definition image. Such computer graphics is now being increasingly actively used in CAD/CAM and other fields of application in science, engineering, manufacturing, etc.
Three-dimensional graphics is generally comprised by a “geometry sub-system” positioned as the front end and a “raster sub-system” positioned as the back end.
The geometry sub-system is a step of geometric processing of the position, posture, etc. of the three-dimensional object displayed on a display screen. In the geometry sub-system, an object is generally treated as an aggregate of a large number of polygons. Geometric processing such as “coordinate conversion”, “clipping”, and “light source computation” are carried out in units of polygons.
On the other hand, the raster sub-system is a step of painting each pixel composing the object. Rasterization is realized by for example interpolating image parameters of all pixels included inside a polygon based on the image parameters found for every vertex of the polygon. The image parameters referred to here include color (graphics drawing color) data expressed by the so-called RGB format or the like, a z-value expressing a distance in a depth direction, and so on. Further, in recent high definition three-dimensional graphics processing, “f” (fog) for giving a perspective feeling, a texture “t” for expressing the feeling of a material or texture of the object surface to impart reality, etc. are included as mage parameters.
Here, the processing for generating the pixels inside a polygon from the vertex information of the polygon is executed by using a linear interpolation technique frequently referred to as a “digital differential analyzer” (DDA). In the DDA process, the inclination of data to a side direction of the polygon is found from the vertex information, the data on the side is calculated by using this inclination, then the inclination of a raster scan direction (X-direction) is calculated. The change of the parameter found from this inclination is added to the parameter value of a start point of the scan so as to generate an internal pixel.
Summarizing the problems to be solved by the invention, in an image processing apparatus, however, when displaying for example data of a curved surface by tessellating the same into columns of unit graphics, minute unit graphics not reaching even one pixel in size are generated. In a conventional image processing apparatus, this has become one of the factors degrading the operating rate of the graphics generator.
For example, if tessellating a curved surface into columns of triangles, as shown in FIG. 1, the number of minute triangles increases. In some cases, as indicated by the hatching in FIG. 1, triangles not having pixels are generated when drawing. Such a so-called 0 pixel triangle (triangle not including the center of a pixel) causes a drop in the performance of a drawing device.
Further, adaptively generating triangles without using a regular pattern for the curved surface data shown in FIG. 2A for example, as indicated by the hatching in FIG. 2B, a fissure occurs in the curved surface. Accordingly, in a conventional image processing apparatus, where adaptively generating triangles without using a regular pattern, as shown in FIG. 2C, it is necessary to take care not to generate a fissure, so there are the disadvantages that there are constraints on the processing and complex processing is required.